//
//  AppDelegate.m
//  测试111
//
//  Created by Burn on 2018/10/17.
//  Copyright © 2018年 buren. All rights reserved.
//

#import "AppDelegate.h"
#import "RViewController.h"
#import "WViewController.h"
#import "TViewController.h"
#import "RootNavViewController.h"
#import "RootTabBarViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    
    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];
    RViewController *rvc = [[RViewController alloc]init];
    WViewController *wvc = [[WViewController alloc]init];
    TViewController *tvc = [[TViewController alloc]init];
    
    RootNavViewController *rnav = [[RootNavViewController alloc]initWithRootViewController:rvc];
    RootNavViewController *wnav = [[RootNavViewController alloc]initWithRootViewController:wvc];
    RootNavViewController *tnav = [[RootNavViewController alloc]initWithRootViewController:tvc];
    
    RootTabBarViewController *tabbarVC = [[RootTabBarViewController alloc]init];
    [tabbarVC addChildViewController:rnav];
    [tabbarVC addChildViewController:wnav];
    [tabbarVC addChildViewController:tnav];
    
    self.window.rootViewController = tabbarVC;
    [self.window makeKeyAndVisible];
    
    rnav.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"首页" image:[UIImage imageNamed:@"jihuiN"] selectedImage:[UIImage imageNamed:@"jihui"]];
    wnav.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"菜单" image:[UIImage imageNamed:@"linliN"] selectedImage:[UIImage imageNamed:@"linli"]];
    tnav.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"我的" image:[UIImage imageNamed:@"renmaiN"] selectedImage:[UIImage imageNamed:@"renmai"]];
    
    
    
    
    return YES;
    

}






@end
